/*
 *	This file is part of Lounge-Cast.
 *
 *  Author:  	Markus Moormann
 *	E-mail:  	mmoorman@uni-osnabrueck.de
 *	Copyright:	University of Osnabrueck (Zentrum Virtuos)
 * 	Website:	www.uni-osnabrueck.de
 *	Date:		16.02.2011
 *
 *	Lounge-Cast is free software: you can redistribute it and/or modify
 *  it under the terms of the GNU General Public License as published by
 *  the Free Software Foundation, either version 3 of the License, or
 *  (at your option) any later version.
 *
 *	Lounge-Cast is distributed in the hope that it will be useful,
 *  but WITHOUT ANY WARRANTY; without even the implied warranty of
 *  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
 *  GNU General Public License for more details.
 *
 *  You should have received a copy of the GNU General Public License
 *  along with Lounge-Cast.  If not, see <http://www.gnu.org/licenses/>.
 */
package webservice.vo;

import java.util.Date;

import javax.xml.bind.annotation.XmlElement;
import javax.xml.bind.annotation.XmlRootElement;

/**
 * class representing preferences for player-configuration
 *
 * @author Markus Moormann
 */
@XmlRootElement(name = "preferences")
public class Preferences {
	
	/**
	 * the object containing further information
	 * there is this class because of the structure of the XML file
	 * for configuration of the player
	 * @see Webservice
	 */
	@XmlElement(name = "webservice")
	public Webservice webservice;
	
	/**
	 * the save date
	 */
	@XmlElement(name = "saveDate")
	public Date saveDate;
	
	@XmlElement(name = "showNewsticker")
	public boolean showNewsticker = false;
	
	/**
	 * default construtor
	 */
	public Preferences(){}
	
	/**
	 * constructor creating new <code>Webservice</code> object
	 * 
	 * @param url the URL pointing to webservice
	 * @param api_key key for authenticating against webservice
	 * @param player_id player_id for player
	 */
	public Preferences(String url, String api_key, String player_id) {
		this.webservice = new Webservice(url, api_key, player_id);
		this.saveDate = new Date();
	}

}
